home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
graphics
/
vlapak1.zip
/
TSR_VLA.ZIP
/
TSR.NFO
< prev
next >
Wrap
Text File
|
1993-08-19
|
3KB
|
101 lines
NOTE: The TAB spacing for this and all ASM source from VLA is set to 4.
so if the code looks crappy, change your TAB spacing.
** TASM 3.2 and TLINK 5.1 were used **
────────────────────────────────────────────────────────────────────────────
WELCOME TO YET ANOTHER VLA PRESENTATION!
TSR BASICS
────────────────────────────────────────────────────────────────────────────
* TSR = Terminate Stay Resident (You know that, right? =)
────────────────────────────────────────────────────────────────────────────
The included TSR:
■ Fully uninstalls itself if it's already installed
■ Detects what video mode the computer is in (through BIOS)
only prints the clock in ALPHA modes 0-3
■ Prints a nice little clock in the upper right hand corner of the
screen, blue on green, military time
■ Latches into the multiplex interrupt 2fh properly
■ Is totally useless
■ Is free and has source
────────────────────────────────────────────────────────────────────────────
Files that should be in this ZIP:
VLA.NFO - Same old file, info on how to contact us
TSR.ASM - SOURCE!
TSR.COM - The executable file for those still stuck in MASM
or those who (GASP!) don't have an assembler
TSR.NFO - This file.
CTAS.BAT - One of my batch file to compile a COM file w/ tasm
────────────────────────────────────────────────────────────────────────────
There really isn't much I can say about TSR's... So I'll just point out a
few things to remember...
∙ Save ALL registers in the interrupt handlers
∙ Don't forget to do a OUT 20h,20h if it's a hardware interrupt
∙ Always return with an IRET or RETF 2
∙ If you need to push more than 1 or 2 words to the stack, relocate
the stack to your own area because the current stack may be too
small
∙ Do a PUSHF before a CALL [DWORD cs:OldIntxx]
∙ Stacks always go down when you push something- do this for your stack:
dw 40 dup (?)
The_Stack dw ?
and move sp,offset The_Stack and ss,cs
∙ Whenever you screw with a small stack, DISABLE INTERRUPTS
∙ Memory allocated by FN# 48h - 4Ah stays allocated when you TSR,
if you don't need the memory, release it.
∙ Int 28h is called whenever a character input is requested (Idle INT)
It's a good idea to wait for Idle time to do your TSR. (Set a flag
in your keyboard intercept and when the idle int is called, execute
the TSR.)
∙ Don't allow reentry into your interrupt handlers, especially with
pop-ups.
And one last thing that I didn't use or mention...
Function 34h, int 21h returns a far ptr [ES:BX] to a flag that indicates
if dos is currently running a function. If the byte at [ES:BX] is 0, then
it is safe to do your TSR. Pop-ups are the ones you really need to do this
in. Absolutly DO NOT call a DOS function if the InDOS flag is non-zero.
You really only need to check the flag in IRQ handlers, not software
INT's, but checking doesn't hurt.
And that is it. Until next time.. (hopefully it'll be a demo!)
Draeden /VLA